{extend name='admin@public/content'}

{block name="button"}
<!--{if auth("$classuri/add")}-->
<button data-open='{:url("@$classuri/add")}' data-title="添加单页" class='layui-btn layui-btn-sm'>添加单页</button>
<!--{/if}-->
<!--{if auth("$classuri/del")}-->
<button data-update="" data-field='delete' data-action='{:url("@$classuri/del")}' class='layui-btn layui-btn-sm layui-btn-danger'>删除单页</button>
<!--{/if}-->
{/block}

{block name="content"}
<form onsubmit="return false;" data-auto="true" method="post">
	<!--{if empty($list)}-->
	<p class="help-block text-center well">没 有 记 录 哦！</p>
	<!--{else}-->
	<input type="hidden" value="resort" name="action">
	<table class="layui-table" lay-skin="line">
		<thead>
		<tr>
			<th class='list-table-check-td'>
				<input data-auto-none="none" data-check-target='.list-check-box' type='checkbox'>
			</th>
			<th class='text-left nowrap'>标题</th>
			<th class='text-left nowrap'>添加时间</th>
			<th class='text-left nowrap'>更新时间</th>
			<th class='text-center'></th>
		</tr>
		</thead>
		<tbody>
		{foreach $list as $key=>$vo}
		<tr>
			<td class='list-table-check-td'>
				<input class="list-check-box" value='{$vo.id}' type='checkbox'>
			</td>
			<td class='text-left nowrap'>
				{$vo.title}
			</td>
			<td class='text-left nowrap'>
				{$vo.create_at|date="Y-m-d H:i:s"}
			</td>
			<td class='text-left nowrap'>
				{$vo.update_at|date="Y-m-d H:i:s"}
			</td>
			<td class='text-center nowrap'>

				{if auth("$classuri/edit")}
				<span class="text-explode">|</span>
				<a data-title="编辑单页" data-open='{:url("@$classuri/edit")}?id={$vo.id}'>编辑</a>
				{/if}


				{if auth("$classuri/del")}
				<span class="text-explode">|</span>
				<a data-update="{$vo.id}" data-field='delete' data-action='{:url("$classuri/del")}'>删除</a>
				{/if}

			</td>
		</tr>
		{/foreach}
		</tbody>
	</table>
	{if isset($page)}<p>{$page|raw}</p>{/if}
	<!--{/if}-->
</form>
{/block}